/**
 * modelconstraintfactory.cpp is part of %PROJECTNAME%.
 *
 * %PROJECTNAME% is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * %PROJECTNAME% is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with %PROJECTNAME%.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "modelconstraintfactory.h"
#include "../constraints/modelallowidlesconstraint.h"
#include "../constraints/modelmaxtimeconstraint.h"
#include "../constraints/modelprecedenceconstraint.h"

ModelConstraintFactory ModelConstraintFactory::m_instance;

ModelConstraintFactory & ModelConstraintFactory::Instance()
{
    return m_instance;
}

ModelAllowIdlesConstraint * ModelConstraintFactory::CreateAllowIdleConstraint( bool a_allowIdle )
{
    return new ModelAllowIdlesConstraint( a_allowIdle );
}

ModelMaxTimeConstraint * ModelConstraintFactory::CreateMaxTimeConstraint( tTime a_maxTime )
{
    return new ModelMaxTimeConstraint( a_maxTime );
}

ModelPrecedenceConstraint * ModelConstraintFactory::CreatePrecedenceConstraint( const std::string & a_taskBefore, const std::string & a_taskAfter )
{
    return new ModelPrecedenceConstraint( a_taskBefore, a_taskAfter );
}
